package com.hd.crdao.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 *
 *@author Programming
 *@date 2017/5/24 0024
 */
public class MyOrderPageAdapter extends FragmentPagerAdapter {
    private List<Fragment> fragmentLists;
    private final String[] titles = {"全部", "待付款", "已付定金", "已完成"};

    public MyOrderPageAdapter(FragmentManager fm, List<Fragment> fragmentLists) {
        super(fm);
        this.fragmentLists = fragmentLists;
    }

    @Override
    public Fragment getItem(int position) {
        return fragmentLists.get(position);
    }

    @Override
    public int getCount() {
        return fragmentLists.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titles[position];
    }


}
